import request from '@/utils/request'

export default{
    //条件查询分页
    pageList(pageNum,pageSize){
        return request({
            url: `/playerPlace/selectPlayerPlacePage/${pageNum}/${pageSize}`,
            method: 'get',
            //使用json格式传递 写法data：searchObj
            //使用j普通格式传递 写法params：searchObj
            // data:searchObj 
          })
    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    removePalyerPlaceId(id){
        return request({
            url: `/playerPlace/deletePlayerPlaceById/${id}`,
            method: 'delete',
          })

    },

    savePalyerPlace(playerPlace){
        return request({
            url: `/playerPlace/insertPlayerPlace`,
            method: 'post',
            data:playerPlace
          })
    },

    getPalyerPlaceById(id){
        return request({
            url: `/playerPlace/getPlayerPlaceById/${id}`,
            method: 'get',
          })
    },

    updatePlayerPlace(playerPlace){
        return request({
            url: `/playerPlace/updatePlayerPlace`,
            method: 'post',
            data:playerPlace
          })
    },

    batchRemove(idList) {
        return request({
          url: `/playerPlace/removeBatch`,
          method: `delete`,
          data: idList
        })
    },
    getPlayerPlaceList(gameId) {
      return request({
        url: `/playerPlace/selectPlaceAll`,
        method: `post`,
        params:{
          gameId: gameId
        }
      })
    },
}